<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
<TITLE>HH_PRETRANSLATEMESSAGE command</TITLE>
<style>@import url(coUA.css);</style>
<link disabled rel="stylesheet" href="htmlhelp.css">
</head>

<BODY>

<h1>HH_PRETRANSLATEMESSAGE command</h1>

<p>This command is called in the message loop of your Windows application to ensure proper handling of Windows messages, especially keyboard messages when running HTML Help single thread.</p>

<p>The HTML Help API is <i>not</i> thread safe and must be called from one and only one thread in a process.</p>

<br>
<table border=1 cellpadding=3 cellspacing=0 width=100%>
<TR VALIGN="top">
<TH><I>pszFile</I></TH>
<TH><I>dwData</I></TH>
</TR>

<TR VALIGN="top">
<TD>
Must be NULL.
</TD>
<TD>
Points to a Win32 <b>MSG</b> structure.
</TD>
</TR>
</TABLE>
<BR>

<H2>Example</H2>
<p><pre><code>
MSG msg;
<br>
<br>while (GetMessage (&msg, NULL, 0, 0))  //Retrieve a message from the 
<br> {                                     //calling thread's message queue
<br>  if (!HtmlHelp (
<br>                 NULL,
<br>                 NULL,
<br>                 HH_PRETRANSLATEMESSAGE,
<br>                 &msg))
<br>    {
<br>     TranslateMessage (&msg);
<br>     DispatchMessage (&msg);
<br>    }
<br> }
 </p></pre></code>

<H2>Return value</H2>
<ul>
<li>True, if message is translated.</li>
<li>False, if command fails.</li>
</ul>


<H2>Comments</H2>
<UL>
<li>The <b>MSG</b> structure contains message information from a thread's message queue.</li>

<li>Before calling this command, you must first set the global property <b>HH_GPROPID_SINGLETHREAD</b> to <code>VARIANT_TRUE</code> by calling the <a href="cmd_hh_initialize.htm">HH_INITIALIZE</a> command.</li>
</ul>

<H2>See also</H2>
<p><a href="cmd_hh_initialize.htm">HH_INITIALIZE</a>
<br><a href="cmd_hh_uninitialize.htm">HH_UNINITIALIZE</a></p>


<br>
<table border="0" cellpadding="0" cellspacing="4">
<tr>
<td valign="top"><a href="ov_about_htmlhelp_commands.htm"><img src="home.gif" width=20 height=18 alt="link to overview topic" border="0"></a>
</td>
<td><a href="ov_about_htmlhelp_commands.htm">About commands</A>
</td>
</tr>
<tr>
<td>&nbsp;
</td>
</tr>
</table>

<br>
<!--start keywords--->

<!--end keywords--->


</BODY>
</HTML>
